package com.occludens.server;

import com.google.code.twig.ObjectDatastore;
import com.google.inject.Singleton;
import com.gwtplatform.dispatch.server.guice.HandlerModule;
import com.occludens.server.dispatch.GetUserHandler;
import com.occludens.server.dispatch.GetUserSampleHandler;
import com.occludens.shared.dispatch.GetUserAction;
import com.occludens.shared.dispatch.GetUserSampleAction;
import com.occludens.shared.model.UserInfo;

public class MainHandlerModule extends HandlerModule {

	@Override
	protected void configureHandlers() {
		//bind(ObjectDatastore.class).toProvider(AnnotationObjectDatastoreProvider.class).in(Singleton.class);
		//bind(ObjectDatastore.class).toProvider(AnnotationObjectDatastoreProvider.class);
		bind(UserInfo.class).toProvider(UserInfoProvider.class);
		
		// bind Actions to ActionHandlers and ActionValidators
        bindHandler(GetUserSampleAction.class, GetUserSampleHandler.class);
        bindHandler(GetUserAction.class, GetUserHandler.class);
	}

}
